<template>
    <div>
        <div class="layui-card layadmin-header">
            <div class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
                <a lay-href="">主页</a><span lay-separator="">/</span>
                <a><cite>商家管理</cite></a><span lay-separator="">/</span>
                <a><cite>入驻申请</cite></a>
            </div>
        </div>
        <div>
            <ul name="" id="" >
                <li value="" v-for="item in diqu" @click="add(item)">{{item.region_name}}</li>
            </ul>
            <select name="" id="">
                <option value="" v-for="item in diqu2">{{item.region_name}}</option>
            </select>

        </div>
    </div>
</template>


<script>
import axios from "axios";
export default {
  name: "enterList",
  data() {
    return {
        diqu:[],
        diqu2:[],
        dataList: [],
        page:1,
        apply:[],
        num:'',
    };
  },
  mounted: function() {
        var that = this
        let list = that.$qs.stringify({
            sign: "1E907AA22797F1500A85738F5B44559B",
            // page:pageIndex,
            company: 1,
        });
        axios({
            method: "post",
            url: "http://tshare.76sd.com/address/regionAll",
            headers: {
                "Content-Type": "application/x-www-form-urlencoded"
            },
            data: list
        }).then(res => {
            console.log(res.data.data);
            //for(var i in res.data.data) {
                // console.log(index)
                this.diqu = res.data.data
                // this.diqu2 = this.diqu[1]['list']
                // console.log(this.diqu[num2]['list'])
            //}
        });
  },
  methods: {
    nnnn:function(index){
        console.log(index)
        console.log('1111')
        this.num = index
        this.add(index)

    },
    add: function(item) {
        var that = this
        // this.dataList = this.dataList2
        this.diqu2.length = 0;
        console.log(item);
        this.diqu2.push(...item.list);
    },






    // //申请中
    // apply2: function() {
    //     var that = this
    //     this.dataList = this.dataList2
    //     let pageList = that.$qs.stringify({
    //         token: "6BCC9912AE5EEBEF6B8F12BD7D368FEF",
    //         // page:pageIndex,
    //         agent_id: 2,
    //     });
    //     axios({
    //         method: "post",
    //         url: "/admin/agent/enteringList",
    //         headers: {
    //             "Content-Type": "application/x-www-form-urlencoded"
    //         },
    //         data: pageList
    //     }).then(res => {
    //         console.log(res.data);
    //         for(var i in res.data.data) {
    //             // console.log(res.data.data[i].create_time)
    //             res.data.data[i].create_time = formatDate(new Date(res.data.data[i].create_time * 1000), 'yyyy-MM-dd')
    //             res.data.data[i].check_time = formatDate(new Date(res.data.data[i].check_time * 1000), 'yyyy-MM-dd')
    //         }
    //         this.apply = res.data.data
    //     });
    // },
    //已驳回
    reject: function() {
      this.dataList = this.dataList3;
    }
  },
    // mounted() {
    //     // this.adopt();
    //     this.apply2();
    //     this.add();
    // }
};






</script>

<style scoped>
.layui-card {
  margin-bottom: 15px;
  border-radius: 2px;
  background-color: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.layui-breadcrumb {
  padding: 15px;
}
.layadmin-caller {
  background: #fff;
  padding: 30px;
}
.mt-15 {
  margin-top: 20px;
}
.layui-tab {
  margin: 0 !important;
}
</style>
